<template>
  <div>
    <div class="tabbar">
      <div class="tabbar_list">
        <router-link to="/">
          <div>
            <van-icon name="wap-home-o" size="30px" />
            <van-icon
              name="fire"
              v-show="home"
              size="0.1rem"
              color="orange"
              style="position: absolute; left: 14%"
            />
          </div>
          <div>首页</div>
        </router-link>
      </div>
      <div class="tabbar_list">
        <router-link to="/about">
          <div>
            <van-icon name="records" size="30px" />
            <van-icon
              name="fire"
              v-show="about"
              size="0.1rem"
              color="orange"
              style="position: absolute; left: 39%"
            />
          </div>
          <div>论坛</div>
        </router-link>
      </div>
      <div class="tabbar_list">
        <router-link to="/cart">
          <div>
            <van-icon name="shopping-cart-o" size="30px" />
            <van-icon
              name="fire"
              v-show="cart"
              size="0.1rem"
              color="orange"
              style="position: absolute; left: 64%"
            />
          </div>
          <div>购物车</div>
        </router-link>
      </div>
      <div class="tabbar_list">
        <router-link to="/myslf">
          <div>
            <van-icon name="contact" size="30px" />
            <van-icon
              name="fire"
              v-show="myslf"
              size="0.1rem"
              color="orange"
              style="position: absolute; left: 89%"
            />
          </div>
          <div>我的</div>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["userName", "userstate"],
  data() {
    return {
      home: "",
      about: "",
      cart: "",
      myslf: "",
    };
  },
  created() {
    this.about = this.$parent.about;
    this.home = this.$parent.home;
    this.cart = this.$parent.cart;
    this.myslf = this.$parent.myslf;
  },
  methods: {},
};
</script>

<style>
.tabbar a {
  color: #999999;
}

.tabbar a.router-link-exact-active {
  font-weight: bold;
  color: #222222;
}

.tabbar {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  background-color: #ffffff;
  position: fixed;
  bottom: 0;
  height: 7.5vh;
  /* align-items: center; */
  z-index: 100;
  /* margin-top: 20vh; */
}

.tabbar_list {
  width: 25%;
  font-size: 14px;
}
</style>